FROM openjdk:8-jre-alpine
#FROM openjdk:11.0.10-jre-slim
VOLUME ["/config", "/manage"]
EXPOSE 6699
COPY target/torrent-manager.jar torrent-manager.jar
COPY target/dist webui
# 设置时区为上海
RUN apk add tzdata && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
    && echo "Asia/Shanghai" > /etc/timezone \
    && apk del tzdata

ENTRYPOINT ["java","-jar","torrent-manager.jar"]
#ENTRYPOINT ["java","-jar","-XX:+UnlockExperimentalVMOptions","-XX:+UseZGC","torrent-manager.jar"]
# docker build -t shanke520/torrentmanager:latest .
# docker tag shanke520/torrentmanager:0.04 shanke520/torrentmanager:latest
# docker save tm:test -o tm.tar
# docker load -i tm.tar
# /usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker run -d --name='tm' --net='host' -e TZ="Asia/Shanghai" -e HOST_OS="Unraid" -v '/mnt/user/mydata':'/manage':'rw' -v '/mnt/user/appdata/tm':'/config':'rw' 'tm:test'
